package client.control;

import java.util.ArrayList;
import java.util.List;

import utilities.*;


/**
 * Manage one client connections
 */
public class ClientManager implements TransportReceiver{
	private TransportDriver td;
	private String userName;
	private final String chatControlCluster = "ControlCluster";
	
	
	
	public ClientManager(String userName) throws Exception {
		super();
		this.userName = userName;
		this.td = new TransportDriver(this.userName, chatControlCluster, this);
		this.td.sendMessage(MessageType.M_SYN, "New connection");
	}



	@Override
	public void receiveChatMessage(ChatMessage chatMsg) {
		// TODO Auto-generated method stub
		
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	/*private List<TransportDriver> clientList;
	
	
	private String userName;
	private String chatControlCluster;
	private TransportDriver transportDriver;
	private TransportReceiver transportReceiver;
	
	public ClientManager() throws Exception{
		clientList = new ArrayList<TransportDriver>();
	}
	
	public void addClient(TransportDriver td){	clientList.add(td);}
	public void deleteClient(TransportDriver td){	clientList.remove(td);}
	
	@Override
	public void receiveChatMessage(ChatMessage chatMsg) {
		// TODO Auto-generated method stub
		
	}
	
	*/
}
